use rstest::rstest;

use crate::tests::fixtures::RANDOM_USIZE;
use crate::tiling;
use crate::tiling::tiles::Connectors;

#[rstest]
#[case::west_mid_slot(
    2,
    1,
    Connectors {
        north: *RANDOM_USIZE + 11,
        east: 0,
        south: 0,
        west: *RANDOM_USIZE + 2,
    },
)]
#[case::east_mid_slot(
    2,
    2,
    Connectors {
        north: 0,
        east: *RANDOM_USIZE + 10,
        south: *RANDOM_USIZE + 5,
        west: *RANDOM_USIZE + 1,
    },
)]
fn test_slot_grid_determine_base_tile_connectors(
    #[case] row: usize,
    #[case] col: usize,
    #[case] expected_connectors: Connectors,
) {
    let slot_grid = tiling::slot_grid::tests::create_test_slot_grid(false, false);
    let tile_connectors = slot_grid.determine_base_tile_connectors(row, col);

    assert_eq!(tile_connectors, expected_connectors);
}
